import request from '@/utils/request'

// 查询课程视频集列表
export function listEpisode(query) {
  return request({
    url: '/course/episode/list',
    method: 'get',
    params: query
  })
}

// 查询课程视频集详细
export function getEpisode(episodeId) {
  return request({
    url: '/course/episode/' + episodeId,
    method: 'get'
  })
}

// 新增课程视频集
export function addEpisode(data) {
  return request({
    url: '/course/episode',
    method: 'post',
    data: data
  })
}

// 修改课程视频集
export function updateEpisode(data) {
  return request({
    url: '/course/episode',
    method: 'put',
    data: data
  })
}

// 删除课程视频集
export function delEpisode(episodeId) {
  return request({
    url: '/course/episode/' + episodeId,
    method: 'delete'
  })
}
